﻿namespace FFF.Test.Areas.FW.Controllers
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore.Http;
    using Microsoft.AspNetCore.Mvc;
    using FFF.Test.Application.AppServices.FW;
    using FFF.Test.Application.Repositories.FW;
    using FFF.Test.Controllers;

    /// <summary>
    /// 标准角色动作中间表控制器
    /// </summary>
    [Area("FW")]
    public class FWStandardRole2ActionController : YdmAbpControllerBase
    {
        private readonly IFWStandardRole2ActionAppService _fWStandardRole2ActionAppService;

        /// <summary>
        /// Initializes a new instance of the <see cref="FWStandardRole2ActionController"/> class.
        /// 标准角色动作中间表构造方法
        /// </summary>
        /// <param name="fWStandardRole2ActionAppService">标准角色构造方法</param>
        public FWStandardRole2ActionController(IFWStandardRole2ActionAppService fWStandardRole2ActionAppService)
        {
            this._fWStandardRole2ActionAppService = fWStandardRole2ActionAppService;
        }

        /// <summary>
        /// [标准角色动作中间表]主页
        /// </summary>
        /// <returns>页面</returns>
        public IActionResult FWStandardRole2ActionIndex()
        {
            return base.View();
        }

        /// <summary>
        /// [标准角色动作中间表]创建页
        /// </summary>
        /// <returns>页面对象</returns>
        public IActionResult FWStandardRole2ActionCreate()
        {
            return base.View();
        }

        /// <summary>
        /// [标准角色动作中间表]编辑页
        /// </summary>
        /// <returns>页面对象</returns>
        public IActionResult FWStandardRole2ActionEdit()
        {
            return base.View();
        }

        /// <summary>
        /// [标准角色动作中间表]详情页
        /// </summary>
        /// <returns>页面对象</returns>
        public IActionResult FWStandardRole2ActionDetail()
        {
            return base.View();
        }

        /// <summary>
        /// [标准角色动作中间表]设置权限
        /// </summary>
        /// <param name="standardRoleGUID">角色GUID</param>
        /// <returns>页面</returns>
        public async Task<IActionResult> SetRightIndex(Guid standardRoleGUID)
        {
            var inDto = new GetRoleRightsInDto()
            {
                RoleGUID = standardRoleGUID
            };
            GetRoleRightsOutDto result = await this._fWStandardRole2ActionAppService.GetRoleRights(inDto);
            base.ViewBag.RoleRightDto = result;
            return base.View();
        }
    }
}
